function out=DF(X)

c = 299792.458;

rho1 = 26570;
phi1 = 7*pi/29;
theta1 = 7*pi/8;

rho2 = 26570;
phi2 = pi/6;
theta2 = 11*pi/20;

rho3 = 26570;
phi3 = pi/7;
theta3 = 9*pi/13;

rho4 = 26570;
phi4 = pi/3;
theta4 = 4*pi/5;

rho5 = 26570;
phi5 = 1.05*pi/3;
theta5 = 0.95*4*pi/5;

rho6 = 26570;
phi6 = 0.95*pi/3;
theta6 = 1.05*4*pi/5;

rho7 = 26570;
phi7 = 0.97*pi/3;
theta7 = 1.03*4*pi/5;

rho8 = 26570;
phi8 = 0.94*pi/3;
theta8 = 1.02*4*pi/5;

A1 = rho1*cos(phi1)*cos(theta1);
A2 = rho2*cos(phi2)*cos(theta2);
A3 = rho3*cos(phi3)*cos(theta3);
A4 = rho4*cos(phi4)*cos(theta4);
A5 = rho5*cos(phi5)*cos(theta5);
A6 = rho6*cos(phi6)*cos(theta6);
A7 = rho7*cos(phi7)*cos(theta7);
A8 = rho8*cos(phi8)*cos(theta8);

B1 = rho1*cos(phi1)*sin(theta1);
B2 = rho2*cos(phi2)*sin(theta2);
B3 = rho3*cos(phi3)*sin(theta3);
B4 = rho4*cos(phi4)*sin(theta4);
B5 = rho5*cos(phi5)*sin(theta5);
B6 = rho6*cos(phi6)*sin(theta6);
B7 = rho7*cos(phi7)*sin(theta7);
B8 = rho8*cos(phi8)*sin(theta8);

C1 = rho1*sin(phi1);
C2 = rho2*sin(phi2);
C3 = rho3*sin(phi3);
C4 = rho4*sin(phi4);
C5 = rho5*sin(phi5);
C6 = rho6*sin(phi6);
C7 = rho7*sin(phi7);
C8 = rho8*sin(phi8);

t1 = Time(A1,B1,C1,.0001);
t2 = Time(A2,B2,C2,.0001);
t3 = Time(A3,B3,C3,.0001);
t4 = Time(A4,B4,C4,.0001)+10^-8;
%t5 = Time(A5,B5,C5,.0001);
%t6 = Time(A6,B6,C6,.0001);
%t7 = Time(A7,B7,C7,.0001);
%t8 = Time(A8,B8,C8,.0001);

out=[
    2*(X(1)-A1),2*(X(2)-B1),2*(X(3)-C1),2*c^2*(t1-X(4))
    2*(X(1)-A2),2*(X(2)-B2),2*(X(3)-C2),2*c^2*(t2-X(4))
    2*(X(1)-A3),2*(X(2)-B3),2*(X(3)-C3),2*c^2*(t3-X(4))
    2*(X(1)-A4),2*(X(2)-B4),2*(X(3)-C4),2*c^2*(t4-X(4))
    %2*(X(1)-A5),2*(X(2)-B5),2*(X(3)-C5),2*c^2*(t5-X(4))
    %2*(X(1)-A6),2*(X(2)-B6),2*(X(3)-C6),2*c^2*(t6-X(4))
    %2*(X(1)-A7),2*(X(2)-B7),2*(X(3)-C7),2*c^2*(t7-X(4))
    %2*(X(1)-A8),2*(X(2)-B8),2*(X(3)-C8),2*c^2*(t8-X(4))
    ];